<?php
    if(!isset($_POST['keyword'])||$_POST['keyword']===null){
        header("location: index.php");
    }else{
        $keyword=$_POST['keyword'];
        include "./include/dbclass.php";
        $sql='select * from article where title = ?';
        $db=new DB();
        $results['0']=$db->getall($sql,$keyword);
        $sql1='SELECT * FROM `article` WHERE class_id = 2 ORDER BY date DESC limit 10';
        $results['1']=$db->getall($sql1);
//        var_dump($results);
        include_once "./tpl/list.php";
    }